﻿using System.ComponentModel;
using System.Xml;

namespace Aeon.Configuration
{
    /// <summary>
    /// Aeon configuration common interface.
    /// </summary>
    public interface IAeonConfiguration : INotifyPropertyChanged, IDataErrorInfo
    {
        /// <summary>
        /// Gets a value indicating whether there are any errors in this configuration.
        /// </summary>
        bool HasErrors { get; }

        /// <summary>
        /// Serializes the configuration to an XML element.
        /// </summary>
        /// <param name="xmlWriter">XmlWriter used to serialize the object.</param>
        void Serialize(XmlWriter xmlWriter);
        /// <summary>
        /// Deserializes the configuration from an XML element.
        /// </summary>
        /// <param name="xmlReader">XmlReader used to deserialize the object.</param>
        void Deserialize(XmlReader xmlReader);
    }
}
